package com.yunst.net.handle;

import com.yunst.net.protocol.MessageDecode;
import com.yunst.net.protocol.MessageEncode;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.nio.NioSocketChannel;

/**
 * @author yunst
 * @date 2022/12/30
 */
public class ChannelInitializerHandle extends ChannelInitializer<NioSocketChannel> {
    protected void initChannel(NioSocketChannel channel) throws Exception {
        channel.pipeline().addLast(new MessageEncode());
        channel.pipeline().addLast(new MessageDecode());
        channel.pipeline().addLast(new ChanelHandler());
        channel.pipeline().addLast(new EventHandle());

    }
}
